import requests
import os
headers = {
        'User-Agent' :'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)'
                      ' Chrome/68.0.3423.2 Safari/537.36'
        }

kv = {'wd':'python'}
url ='https://vd3.bdstatic.com/mda-ih0qi72n1mc0miwh/sc/mda-ih0qi72n1mc0miwh.mp4'
root = 'C:\\Users\\kai\\Desktop\\'
path = root+url.split('/')[-1]
try:
    r = requests.get(url,headers=headers)
    with open(path, 'wb') as f:
        f.write(r.content)
        f.close()
except:
    print('fail')

